<template>
	<view>
		<u-popup  v-model="jiapricepop" mode="center" width="80%" ref="auth" :mask-close-able="false" :custom="true" :mask-click="false" @close="closejiaprice">
			<view class="popone">
                <image class="bg" :src="ossThree('/uploads/20250404/a6740382ebb9492d9ed8c12c1e42d198.png')" mode="" />
                <view class="phonenav">
                    <view class="cha" @click="closejiaprice">
                        <image class="icon_gbcha" src="/static/img/icon_gbcha.png" mode="" />
                    </view>
                    <text class="jiename">加工价</text>
                    <view class="queli">
						<u-input v-model="price" type="text" placeholder='请输入新的工价' />
                    </view>
                    <view class="dianbtn" @click="temClick">
                        <text class="bm">确认</text>
                    </view>
                    <!-- <text class="kaolv"  @click="closeedit">取消</text> -->
                </view>
                
            </view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		name: 'CancelOrder',
		props: {
			jiapricepop: {
				type: Boolean,
				default: false
			},
            popid:{
                type: String,
				default: ''
            }

		},
		data() {
			return {
                checked:false,
                newbaoitem:{},
                price:''
			};
		},
		created() {
			
		},
		mounted() {

		},
		methods: {
            closejiaprice(){
                this.$emit("closejiaprice")
            },
            baoClick(){
                if(this.checked){
                    if(!this.baoitem.id){
                        this.$u.toast("请选择险种");
                        return;
                    }
                    this.$emit("baoClick",{
                        checked:this.checked,
                        baoitem:this.baoitem
                    })

                }else{
                    this.closeinsure()
                }
            },
            baoitemClick(item){
                if(!this.checked){
                    this.$u.toast("请先开启保障");
                    return;
                }
                // this.baoitem = item
                this.$emit("baoitemClick",item)
            },
            async temClick(){
                if(!this.price){
                    this.$u.toast("请输入工价");
                    return;
                }
                let res = await this.$u.api.editPrice({
                    task_id:this.popid,
                    price:this.price
                });
                this.price = ''
                this.$u.toast("操作成功");
                this.$emit('temClickjiaprice')
            },

		}
	};
</script>

<style lang="scss" scoped>
   /deep/.u-mode-center-box{
        background-color: transparent;
    }
    .queli{
        display: flex;
        flex-direction: column;
        border: 1rpx solid #333;
		padding:8rpx 20rpx;
		width: 100%;
		border-radius: 20rpx;
		margin: 40rpx 0;
        .queitem{
            display: flex;
            flex-direction: row;
            align-items: center;
            width: 100%;
            .icon_xz_s{
                margin-right: 15rpx;
                width: 36rpx;
                height: 36rpx;
            }
            text{
                font-weight: 500;
                font-size: 28rpx;
                color: #111111;
            }
        }
    }
    .popone{
        width: 100%;
        background: #FFFFFF;
        border-radius: 30rpx;
        // height: 530rpx;
        .bg{
            position: absolute;
            width: 100%;
            height: 300rpx;
            border-radius: 30rpx 30rpx 0 0 ;
        }
        .icon_gbcha{
            width: 40rpx;
            height: 40rpx;
            margin-left: auto;
            position: absolute;
            right: 30rpx;
            top: 30rpx;
        }
        .yuedu{
            height: 80rpx;
            display: flex;
            padding: 0 30rpx;
            align-items: center;
            .icon_xz_n{
                width: 36rpx;
                height: 36rpx;
                margin-right: 8rpx;
            }
            .xy{
                font-weight: 500;
                font-size: 20rpx;
                color: #999999;
                display: block;
                width: 90%;
            }
            .xyhu{
                color: rgba(234, 89, 24, 1);
            }
        }
        .kaolv{
            font-weight: bold;
            font-size: 28rpx;
            color: #666666;
            display: block;
            text-align: center;
            margin-top: 20rpx;
        }
        .phonenav{
            position: relative;
            // margin: 30rpx;
            display: flex;
            flex-direction: column;
            // justify-content: center;
            align-items: center;
            padding: 40rpx 30rpx;
            .img_aq{
                width: 173rpx;
                height: 211rpx;
                margin-bottom: 20rpx;
            }
            .jiename{
                font-weight: bold;
                font-size: 36rpx;
                color: #111111;
            }
            .queren{
                font-weight: 400;
                font-size: 24rpx;
                color: #666666;
                display: block;
                margin: 40rpx 0 80rpx;
            }
            .chaka{
                padding: 30rpx;
                width: 100%;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                background: #F6F7F9;
                border-radius: 16rpx;
                margin: 25rpx 0;
                .chaname{
                    font-weight: bold;
                    font-size: 28rpx;
                    color: #111111;
                }
                .phonenum{
                    display: block;
                    font-weight: bold;
                    font-size: 50rpx;
                    color: #F06047;
                    margin: 10rpx 0;
                }
                .xiugai{
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    .noben{
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #666666;
                    }
                    .xiu{
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #F06047;
                        display: inline-block;
                        margin-left: 6rpx;
                    }
                }
            }
            .dianbtn{
                height: 90rpx;
                background: linear-gradient(90deg, #FF8F39, #FF4D43);
                border-radius: 45rpx;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                width: 100%;
                margin-top: 20rpx;
                .bm{
                    font-weight: bold;
                    font-size: 28rpx;
                    color: #FFFFFF;
                }
                .bmmaio{
                    font-weight: 500;
                    font-size: 20rpx;
                    color: #FFFFFF;
                }
            }
            .bzhang{
                display: flex;
                flex-direction: row;
                align-items: center;
                margin-top: 30rpx;
                .icon_ts{
                    margin-right: 6rpx;
                    width: 24rpx;
                    height: 24rpx;
                }
                .zhiname{
                    font-weight: 400;
                    font-size: 20rpx;
                    color: #F06047;
                }
            }
        }
    }
    .kmiao{
        font-weight: 500;
        font-size: 28rpx;
        color: #111111;
        display: block;
        margin: 40rpx 0 20rpx;
    }
    .renxie{
        font-weight: 500;
        font-size: 28rpx;
        color: #FF8C39;
        display: block;
        margin-bottom: 50rpx;
    }
    .img_cg{
        width: 140rpx;
        height: 140rpx;
        margin-bottom: 15rpx;
    }
    .yikai{
        font-weight: bold;
        font-size: 36rpx;
        color: #111111;
    }
    .kaiti{
        background: #E9FFEB;
        border-radius: 6rpx;
        display: flex;
        flex-direction: column;
        width: 100%;
        margin: 20rpx 0 15rpx;
        padding:20rpx 10rpx;
        .kaione{
            display: flex;
            flex-direction: row;
            align-items: center;
            .icON_bz{
                margin-right: 7rpx;
                width: 24rpx;
                height: 24rpx;
            }
            .jianame{
                font-weight: bold;
                font-size: 28rpx;
                color: #16B925;
            }
        }
        .youxiao{
            font-weight: 500;
            font-size: 20rpx;
            color: #16B925;
            display: block;
            margin-top: 10rpx;
        }
    }
</style>
